<div id="job_actions">
  <h3><?php echo __('Admin') ?></h3>
  <ul>
    <?php if (!$job->getIsActivated()): ?>
      <li><?php echo link_to(__('Edit'), 'job_edit', $job) ?></li>
      <li><?php echo link_to(__('Publish'), 'job_publish', $job, array('method' => 'put')) ?></li>
    <?php endif ?>
    <li><?php echo link_to(__('Delete'), 'job_delete', $job, array('method' => 'delete', 'confirm' => __('Are you sure?'))) ?></li>
    <?php if ($job->getIsActivated()): ?>
      <li<?php $job->expiresSoon() and print ' class="expires_soon"' ?>>
        <?php if ($job->isExpired()): ?>
          Expired
        <?php else: ?>
          Expires in <strong><?php echo $job->getDaysBeforeExpires() ?></strong> days
        <?php endif ?>
 
        <?php if ($job->expiresSoon()): ?>
         - <?php
             echo link_to(__('Extend'), 'job_extend', $job, array('method' => 'put')) .
               __(' for another %activedays% days', array("%activedays%" => sfConfig::get('app_active_days')))
           ?>
        <?php endif ?>
      </li>
    <?php else: ?>
      <li>
        <?php echo __('[Bookmark this %url% to manage this job in the future.]', array('%url%' => link_to('URL', 'job_show', $job, true))) ?>
      </li>
    <?php endif ?>
  </ul>
</div>